Page({
  data: {
    iphoneXheight: 95,
    showGTH: [true, false, true, false],
    keyboard: true,
    voice: false,
    bottom_img: false,
    speak_tip: false,
    voice_gray: true,
    icon: '../../static/image/apply/jia.png',
    extendedContent: true,
    extendedContentElement: true,
    animation: true,
    message: '',
    bottom: 0
  },
  onLoad: function(options) {
    if (wx.getSystemInfoSync().model != "iPhone X") {
      this.setData({
        iphoneXheight: 75
      })
    }
  },
  onReady: function() {

  },
  onShow: function() {

  },
  onHide: function() {

  },
  lbtn: function() {
    if (this.data.keyboard == true) {
      this.setData({
        keyboard: false,
        voice: true,
        bottom_img: true,
        speak_tip: true,
        voice_gray: false
      });
    } else {
      this.setData({
        keyboard: true,
        voice: false,
        bottom_img: false,
        speak_tip: false,
        voice_gray: true
      });
    }
  },
  send: function(event) {
    debugger;
    if (event.detail.message == '') {
      wx.showToast({
        title: '您的消息不能为空哦~',
        icon: "none",
        duration: 2000
      })
    } else {
      // debugger;
      // var flag = this;
      this.setData({
        animation: false,
        extendedContent: true
      })
    }
  },
  rbtn: function() {
    var img = '../../static/image/apply/circle.png';
    if (this.data.icon == img) {
      this.setData({
        icon: '../../static/image/apply/jia.png',
        extendedContent: true,
        extendedContentElement: true,
        animation: true
      });
    } else {
      this.setData({
        icon: '../../static/image/apply/circle.png',
        extendedContent: false,
        extendedContentElement: false,
        animation: true
      });
    }
  },
  /**
   * 点击长按说话按钮
   */
  voice_img() {
    console.log("点击长按说话按钮");
  },

















})